<template>
  <van-nav-bar
    title="商品分类"
    left-text=""
    left-arrow
    @click-left="onClickLeft"
  >
    <template #right>
      <van-icon name="search" size="18" @click="toSearch" />
    </template>
  </van-nav-bar>
</template>

<script>
export default {
  methods: {
    onClickLeft() {
      this.$router.back();
    },
    toSearch() {
      this.$router.push("/search");
    },
  },
};
</script>

<style lang="less">
.van-nav-bar {
  background-color: #08dbdb;
  .van-icon {
    color: #fff;
  }
  .van-nav-bar__title {
    color: #fff;
  }
}
</style>
